警告:这个程序有一个逻辑错误!它不会创建错误消息,但它没有做它应该做的事情。

规则:字符串格式化使用{大括号}来指示变量在字符串中的位置。

  • 点击运行并读取控制台中的输出。
  • 通过添加另一组{}来修复程序,以便打印两个朋友的姓名。
  • 点击运行以查看您是否修复了该程序。固定好后点击提交接下来

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)